import request from '@/utils/request'
// 获取权限列表
export function getPermissionsList(params) {
  return request({
    url: '/permissions',
    params
  })
}
// 获取权限数量
export function getPermissionsSum() {
  return request({
    url: '/permissions/count'
  })
}
// 获取指定权限
export function getPermissionsId(id) {
  return request({
    url: `/permissions/${id}`
  })
}
// 新建权限
export function addPermissions(data) {
  return request({
    url: '/permissions',
    method: 'post',
    data
  })
}
// 编辑权限
export function aditPermissions(data) {
  return request({
    url: `/permissions/${data.id}`,
    method: 'put',
    data
  })
}
// 删除权限
export function delPermissions(id) {
  return request({
    url: `/permissions/${id}`,
    method: 'DELETE'
  })
}
